/*	kd:
	
	Before accessing the bind menu, there's a period in which you hold a key.
	This will decide whether you access the bind or open the menu to bind
	something.
	
	*/

struct Gc_PreBindMenu {
	const tick_tics					= 12;
	const ticks						= 4;
	private FadeTick				timer_t;
	private FadeTick				tick_t;
	private bool					has_ticked;
	
	void Begin () {
		if(tick_tics == 0) {
			return;
		}
		
		tick_t.To(ticks, from: 0);
		timer_t.To(ticks * tick_tics, from: 0);
	}
	
	void NextState () {
		timer_t.Next();
		has_ticked = false;
		
		if(timer_t.Now() % tick_tics == 0) {
			tick_t.Next();
			// statusbar.FlashCrosshair();
			Gcs_ShopSounds.BindTick();
			has_ticked = true;
		}
	}
	
	void EndState () {
		has_ticked = false;
	}
	
	bool HasTicked () const {
		return has_ticked;
	}
	
	// kd: If it finishes by itself, this is true.
	bool IsDone () const {
		return ticks <= tick_t.Now();
	}
	
	ui void Draw (double t = 1) const {
	}
}
